package cloud.lipanpan.eduv1.course.service.impl;

import cloud.lipanpan.eduv1.course.mapper.CourseTypeMapper;
import cloud.lipanpan.eduv1.course.service.CourseService;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * 课程业务实现类
 *
 * @program: edu-v1
 * @description: 课程业务实现类
 * @author: 李盼盼
 * @create: 2021-12-05 21:04
 **/
@Service
public class CourseServiceImpl implements CourseService {


    @Resource
    CourseTypeMapper courseTypeMapper;

    /**
     * 课程首页默认加载
     *
     * @param mav
     * @return
     */
    @Override
    public ModelAndView toIndex(ModelAndView mav) {

        mav.addObject("courseTypeList", courseTypeMapper.selectList(null));


        return mav;
    }
}
